from Vehicle_Class import Vehicle

class Car(Vehicle):
    pass

class Truck(Vehicle):   #卡车类（载重量，最高速）
    maxspeed = 120
    def info(self):   #输出车辆信息
        print(f"Truck Brand: {self.brand}")
        print(f"Truck PlateNumber: {self.number} ")
        print(f"Truck Load Capacity: {self.loadcap}Ton")
        return
    
    def __init__(self,vinfo):   #初始化车辆信息
        self.brand = vinfo["brand"]
        self.number = vinfo["number"]
        self.loadcap = vinfo["loadcap"]
        self.speed = 0
        return  


def main():
    car1Info = {"brand":"Audi","number":"粤B12345","color":"White"}
    car1 = Car(car1Info)
    car1.info()
    car1.run(160)

    truck1Info = {"brand":"Dongfeng","number":"粤A54321","loadcap":"20"}
    truck1 = Truck(truck1Info)
    #truck1 = Truck(car1Info)
    truck1.info()
    truck1.run(160)

if __name__ == "__main__":
    main()
